module.exports = (ctx, next) => {
  if (ctx.session.username) {
    next()
  } else {
    ctx.body = {
      code: -1,
      msg: "请登录"
    }
  }
}
